<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title></title>
    <link href="../../lib/layui/css/layui.css" rel="stylesheet" />
    <link href="../../lib/font-awesome-4.7.0/css/font-awesome.css" rel="stylesheet" />
    <link href="../../lib/winui/css/winui.css" rel="stylesheet" />
</head>
<body>
    <div class="winui-toolbar">
        <div class="winui-tool">
            <button id="reloadTable" class="winui-toolbtn"><i class="fa fa-refresh" aria-hidden="true"></i>刷新</button>
            <button id="adddepart" class="winui-toolbtn"><i class="fa fa-plus" aria-hidden="true"></i>新增</button>
            <button id="deletedepart" class="winui-toolbtn"><i class="fa fa-trash" aria-hidden="true"></i>删除</button>
            <button id="treedepart" class="winui-toolbtn"><i class="fa fa-refresh" aria-hidden="true"></i>机构树</button>
        </div>
    </div>
    <div style="margin:auto 10px;">
        <table id="woodepart" lay-filter="departtable"></table>
        <script type="text/html" id="bardepart">
            <a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
            <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
        </script>
        
        <script type="text/html" id="stateTpl">
            <input type="checkbox" name="Dstatus" value="{{d.Id}}" lay-skin="switch" lay-text="启用|禁用" lay-filter="deptstate" {{ d.Dstatus == 1 ? 'checked' : '' }}>
        </script>
        <script type="text/html" id="IsCompanyTpl">
            <input type="checkbox" name="IsCompany" value="{{d.Id}}" lay-skin="switch" lay-text="是|否" lay-filter="IsCompany" {{ d.IsCompany == 1 ? 'checked' : '' }}>
         </script>
        <script type="text/html" id="IsMainTpl">
            {{#  if(d.IsMain ===1){ }}
            <span style="color:#5FB878;">{{ d.IsMainDic }}</span>
            {{#  } else { }}
            {{ d.IsMainDic }}
            {{#  } }}
        </script>
    </div>
    <script src="/lib/layui/layui.js"></script>
    <script> 
        layui.config({
            base: '../../js/'
        }).extend({
            departlist:'devdepart/list'
        })
        .use('departlist');
    </script>
</body>
</html>